package org.xiyu.yee.pjwto.event;

import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
import net.minecraft.server.MinecraftServer;
import org.xiyu.yee.pjwto.Constants;
import org.xiyu.yee.pjwto.trading.PiglinTradeManager;

/**
 * Fabric 事件处理器
 */
public class FabricServerEvents {
    
    public static void register() {
        ServerLifecycleEvents.SERVER_STARTED.register(FabricServerEvents::onServerStarted);
    }
    
    private static void onServerStarted(MinecraftServer server) {
        Constants.LOG.info("Server started, initializing piglin loot table");
        PiglinTradeManager.initializeLootTable(server);
    }
}
